package cn.xie.blog.serverutil.constant.redis;

/**
 * @author: xiaoxie
 * create: 2025-04-21 22:20
 * @BelongsProject: blog-parent
 * @BelongsPackage: cn.xie.blog.serverutil.constant.redis
 * description: redis常量类
 */
public final class RedisConstant {
    //用户登录
    public static final String USER_LOGIN_KEY_PREFIX = "user:login:";
    public static final String ADMIN_LOGIN_KEY_PREFIX = "admin:login:";
    public static final String USER_Context_KEY_PREFIX = "user:context:";
    public static final String ADMIN_Context_KEY_PREFIX = "admin:context:";
    public static final String USER_LOGIN_REFRESH_KEY_PREFIX = "user:login:refresh:";
    public static final int USER_LOGIN_KEY_TIMEOUT = 60 * 60 * 24 * 100;
    public static final int USER_LOGIN_REFRESH_KEY_TIMEOUT = 60 * 60 * 24 * 365;
    // 增加一个常量，用于存储用户错误登录次数的前缀
    public static final String WRONG_PWD_COUNT_PREFIX = "WRONG_PWD_COUNT:";
    // 增加一个常量，用于存储账号锁定的前缀
    public static final String ACCOUNT_LOCK_PREFIX = "ACCOUNT_LOCK:";
    public static final int ACCOUNT_LOCK_KEY_TIMEOUT = 60 * 100;

    //验证码
    public static final String LOGIN_CODE__KEY_PREFIX = "login:code:";
    public static final int LOGIN_CODE_TIMEOUT = 60 * 15 * 100;
    public static final String REGISTERED_CODE_KEY_PREFIX = "registered:code:";

}
